package com.bjc.controller;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @program: servlet
 * @description:
 * @author: bjc
 * @create: 2021-08-19 21:42
 */
public class OneServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("OneServlet 负责 洗韭菜");

        //重定向解决方案:
        // [地址格式: /网站名/资源文件名]
        response.sendRedirect("/myWeb/two");
//        response.sendRedirect("http://www.baidu.com");
    }
}
